package cn.edu.zafu.bigdata.zyf;

public class TestStudentGradeManager {

    public static void main(String[] args) {
        // 创建学生成绩管理对象
        StudentGradeManager manager = new StudentGradeManager();

        // 添加学生成绩
        manager.addStudent("Alice", 89);
        manager.addStudent("Bob", 95);
        manager.addStudent("Charlie", 78);

        // 查询学生成绩
        System.out.println("Alice's grade: " + manager.getGrade("Alice")); // 应该输出89
        System.out.println("Bob's grade: " + manager.getGrade("Bob")); // 应该输出95
        System.out.println("Charlie's grade: " + manager.getGrade("Charlie")); // 应该输出78
        System.out.println("David's grade: " + manager.getGrade("David")); // 不存在，应该输出-1

        // 删除学生成绩
        manager.removeStudent("Bob");
        System.out.println("Bob's grade after removal: " + manager.getGrade("Bob")); // 应该输出-1，因为Bob的成绩已被删除
    }
}